<%@page import="com.hrms.core.Utils"%>
<%@page import="com.hrms.core.Constants"%>
<%@page import="com.hrms.domain.DailyCell"%>
<%@page import="com.hrms.domain.Task"%>
<%@page import="com.google.appengine.api.datastore.Key"%>
<%@page import="com.google.appengine.api.datastore.KeyFactory"%>
<%@page import="java.io.FileInputStream"%>
<%@page import="java.io.InputStream"%>
<%@page import="com.thoughtworks.xstream.XStream"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Arrays"%>
<%@page import="com.hrms.core.RoleManager"%>
<%@page import="com.hrms.domain.BusinessObjectImpl"%>
<%@page import="com.hrms.domain.Employee"%>
<%

Employee e  = new Employee();
e.setCreatedByUser("charmsstyler");
e.setEmpNo("558");
e.setName("Captain Charms ");
e.setUserId("charmsstyler@gmail.com");
e.setSupervisor("charmsstyler@gmail.com");
e.setInitials("CS");
e.setRole(RoleManager.HR.getName());
e.setTeam("SL Development");
e.save();


e  = new Employee();
e.setCreatedByUser("charmsstyler");
e.setEmpNo("5258");
e.setName("chathuranga");
e.setUserId("charmsstyler1@gmail.com");
e.setSupervisor("charmsstyler1@gmail.com");
e.setInitials("CG");
e.setRole(RoleManager.HR.getName());
e.setTeam("SL Development");
e.save();

%>

// Add Leave Category
<%

List<Employee> e1 = BusinessObjectImpl.select(Employee.class, 0, 25, "where initials==:p0", new Object[]{"CS"});

for(Employee j: e1){
	out.print(j.getName());
}


Task t = new Task();
t.setDate(Utils.getTodayDate());
t.setDescription("my description"+Math.random());
t.setIdUrl("8917"+Math.random());
t.setUserId("charmsstyler@gmail.com");
t.setType(Constants.TASK_TYPE.BUG.toString());
t.save();


DailyCell dc = new DailyCell();
dc.setTaskKey(t.getKey());
dc.setCelldata("Started "+Math.random());
dc.setDate(Utils.getTodayDate());
dc.save();
/*List<String> leaveTypes = Arrays.asList("Annual", "Casual", "Medical", "Lieu Leave", "Maternity Leave", "Duty Leave", "Accident Leave", "Special Leave");

Key k = KeyFactory.stringToKey("ag1jaGFybXNzdHlsZXI0cgoLEgRUZXN0GAEM");
for(int i=0 ; i < 5; i++){
	out.println( KeyFactory.keyToString( KeyFactory.createKey(k,"Test", 1) ) +"<br>") ;
}*/


%>
